Fixed broken testcase for string-based form of rustflags config key.
authorInokentiy Babushkin <inokentiy.babushkin@googlemail.com>
Fri, 2 Dec 2016 15:00:58 +0000 (16:00 +0100)
committerInokentiy Babushkin <inokentiy.babushkin@googlemail.com>
Fri, 2 Dec 2016 15:00:58 +0000 (16:00 +0100)
tests/rustflags.rs

index 1cf9e96cd14b1ee7c5dbdda3c83d55eb455ab43e..f5117c3137930bfb6cf620cfe75f4728a9cc75e2 100644 (file)
@@ -997,11 +997,12 @@ fn target_rustflags_string_and_array_form1() {
 #[test]
 fn target_rustflags_string_and_array_form2() {
     let p1 = project("foo")
-        .file("Cargo.toml", &format!(r#"
+        .file("Cargo.toml", r#"
             [package]
             name = "foo"
             version = "0.0.1"
-
+        "#)
+        .file(".cargo/config", &format!(r#"
             [target.{}]
             rustflags = ["--cfg", "foo"]
         "#, rustc_host()))
@@ -1016,11 +1017,12 @@ fn target_rustflags_string_and_array_form2() {
 "));
 
     let p2 = project("foo")
-        .file("Cargo.toml", &format!(r#"
+        .file("Cargo.toml", r#"
             [package]
             name = "foo"
             version = "0.0.1"
-
+        "#)
+        .file(".cargo/config", &format!(r#"
             [target.{}]
             rustflags = "--cfg foo"
         "#, rustc_host()))